/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package negocios;

import datos.BaseDeDatosDB;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author May
 */
public class Prendas {
    private ArrayList prendas=new ArrayList();
  private ArrayList codigos=new ArrayList();
   
  public void listar() {
        try {
            BaseDeDatosDB prendaDB = new BaseDeDatosDB();
            setPrendas(prendaDB.listarPrenda());
        } catch (SQLException ex) {
            Logger.getLogger(Prendas.class.getName()).log(Level.SEVERE, null, ex);
        }
  }
     public void listarXUser(String ced) {
        try {
            BaseDeDatosDB prendaDB = new BaseDeDatosDB();
            setPrendas(prendaDB.listarPrendaUser(ced));
        } catch (SQLException ex) {
            Logger.getLogger(Prendas.class.getName()).log(Level.SEVERE, null, ex);
        }
  }
    public ArrayList getPrendas() {
        return prendas;
    }

    public void setPrendas(ArrayList prendas) {
        this.prendas = prendas;
    } 
    
      public void listarCodigos() {
        try {
            BaseDeDatosDB prendaDB = new BaseDeDatosDB();
            setCodigos(prendaDB.listarIdsPrendas());
        } catch (SQLException ex) {
            Logger.getLogger(Prendas.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    private void setCodigos(ArrayList listarIds) {
        this.codigos = listarIds;
    }
     public ArrayList getCodigos() {
        return codigos;
    } 
}
